package org.lanqiao.tjut.dao;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.lanqiao.tjut.bean.UserBean;
import org.lanqiao.tjut.db.DBDriverFactory;

public class LoginDao {
   public boolean isLogined(UserBean userB){
	   boolean isL=false;
	   //登录验证sql语句
	   String strSql="SELECT  *FROM EDUUSERS WHERE USERNAME=? AND USERPASSWORD=?";
	List<UserBean>  lstUsers =  DBDriverFactory.getDBDriverInstance().query(strSql, new BeanListHandler<UserBean>(UserBean.class),
			   new Object[] {userB.getUsername(),userB.getUserpassword()});
	if(lstUsers != null && lstUsers.size()>0){
		isL=true;
	}
 	   return isL;
   }
}
